package com.springboot.demo.service;

import com.springboot.demo.entity.Inbox;
import com.springboot.demo.entity.PageRequest;
import com.springboot.demo.entity.PageResult;
import com.springboot.demo.entity.User;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * @author wubc683
 * @desc
 * @date 2021-09-01 9:34
 */
public interface InboxService {

    /**
     * 获取消息
     *
     * @param uid
     * @param readed
     * @param type
     * @param startDate
     * @param endDate
     * @param search
     * @param sort
     * @param request
     * @return: com.springboot.demo.entity.PageResult
     */
    PageResult getMsg(Long uid, Integer readed, Integer type, Date startDate, Date endDate, String search,String sort,
                      PageRequest request);

    /**
     * 清空收件箱所有消息
     *
     * @param uid
     * @return: void
     */
    void deleteAllMsg(Long uid);

    /**
     * 标记所有消息为已读
     *
     * @param uid
     * @return: void
     */
    void markAllMsgReaded(Long uid);

    /**
     * 标记所选消息为已读
     *
     * @param uid
     * @param msgIds
     * @return: void
     */
    void markMsgReaded(Long uid, List<Long> msgIds);

    /**
     * 删除勾选消息
     *
     * @param uid
     * @param msgIds
     * @return: void
     */
    void deleteMsg(Long uid, List<Long> msgIds);

    /**
     * 获取消息信息
     *
     * @param uid
     * @param msgId
     * @return: Inbox
     */
    Inbox getMsgInfo(Long uid,Long msgId);

//    /**
//     * 通过websocket发送未确认的消息给用户
//     * @param user
//     * @return: void
//     */
//    void sendUnconfirmedMsg(User user);

}
